// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "SurveillanceSubWindow.generated.h"

DECLARE_DELEGATE_TwoParams(FOnZoomBtnClicked, bool, USurveillanceSubWindow*);

class UImage;
class UButton;
class UTextBlock;

UCLASS()
class SURVEILLANCECAMERA_API USurveillanceSubWindow : public UUserWidget, public TSharedFromThis<USurveillanceSubWindow>
{
	GENERATED_BODY()

public:
	FOnZoomBtnClicked Dele_OnZoomBtnClicked;

	UFUNCTION()
	void OnZoomBtnClicked();

	void SetImageMaterial(UMaterialInstanceDynamic* ImgMaterial);

	void SetCameraName(FName Name);
	
	int32 Row;
	int32 Column;
	float Padding;
protected:
	virtual void NativeOnInitialized() override;

	
	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, meta=(BindWidget))
	UImage* Image_View;

	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, meta=(BindWidget))
	UButton* Btn_Zoom;

	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, meta=(BindWidget))
	UTextBlock* Text_CameraName;
	
	bool bIsZoom;
};
